<%@ page import="com.ftt.product.model.Product" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024/11/28
  Time: 下午8:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        body {
            display: grid;
            place-items: center;
            background-color: #f9f9f9;
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
        }

        .product-item {
            background-color: white;
            border: 1px solid #ddd;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            padding: 20px;
            width: 300px;
        }

        .product-img img {
            width: 100%;
            height: auto;
            border-radius: 8px;
        }

        .product-info {
            margin-top: 15px;
        }

        .product-info div {
            margin: 10px 0;
            font-size: 16px;
        }

        .product-info span {
            font-weight: bold;
            font-size: 18px;
        }

        .product-info del {
            color: red; /* 原价用红色表示 */
        }

        .product-info a {
            display: inline-block;
            margin-right: 10px;
            padding: 10px 15px;
            background-color: #007bff;
            color: white;
            text-decoration: none;
            border-radius: 5px;
            transition: background-color 0.3s;
        }

        .product-info a:hover {
            background-color: #0056b3;
        }

    </style>
</head>
<body>
<div class="product-item">
    <h1 style="text-align: center">商品详情显示页</h1>
    <div class="product-img">
        <img src="img/images/productImages/<%=((Product)(request.getAttribute("product"))).getPicture()%>" alt="">
    </div>
    <div class="product-info">
        <div>品名：<span><%=((Product)(request.getAttribute("product"))).getName()%></span></div>
        <div>原价：<del><%=((Product)(request.getAttribute("product"))).getMarket_price()%></del>元</div>
        <div>现价：<span><%=((Product)(request.getAttribute("product"))).getSell_price()%></span>元</div>
        <div>简介：<span><%=((Product)(request.getAttribute("product"))).getDescription()%></span></div>
        <div><a href="#">返回</a></div>
        <div><a href='addCar.do?number=1&productId=<%=((Product)(request.getAttribute("product"))).getId()%>'>添加到购物车</a></div>
    </div>
</div>
</body>
</html>
